#
#   Mission.py
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; version 2 of the License.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   Copyright
#   Author: Salvatore S. Gionfriddo
#   Contributors: Nicholas F. Hoover
#   Created: 2007.07.24
#   Last Modified: 2007.07.25
#



    ##########################################################
    # INTRODUCTION                                           #
    ##########################################################
    # Intro: Kill a kid                                      #
    # Level One: Kill 5 kids                                 #
    # Level Two: Eat 10 kids                                 #
    # Level Three: Kill 5 kids with kicks and 5 with punches #
    # Level Four: Kill 15 kids with flame                    #
    # Level Five: Kill 50 kids use farts to help             #
    ##########################################################
    
    
NUM_INTRO_LEVELS = 6
    
INTRO_LEVELS = range(NUM_INTRO_LEVELS)
        
INTRO_LEVELS[0] = ["Go On A Walk", [[1, "Kills"]], 0,
                 ["If anyone bothers you, press 's' to quickly punch them."
                  "",
                  "HINT: Punches are very fast and can kill up to 2 kids at the same time.",
                  "      They will hit kids between your body and your extended fist."],
                 
                 [["Linear", [.1, 1, 0, 90], "Kid", "Kills"]]]
    
INTRO_LEVELS[1] = ["Learning To Kill", [[5, "Kills"]], 1000,
                 ["You had to kill him didn't you? No self control. Now the hunger won't end.",
                  "Goal: Kill 5 Kids",
                  "",
                  "Your hunger meter is always decreasing, if it drops all the way to starving, your",
                  "health will start dropping also.",
                  "Maybe some food will show up in the next level.",
                  "Check the upper right corner of the screen to see how close you are to the goal."],
                 
                 [["Linear", [.2, 2, 0, 90], "Kid", "Kills"]]]
    
INTRO_LEVELS[2] = ["Learning To Eat", [[10, "Eaten"]], 10000,
                 ["Getting hungry aren't you? I bet those dead kids are edible!",
                  "Goal: Eat 10 Dead Kids",
                  "",
                  "Press the spacebar to bend over and eat up to 3 Dead Kids and/or Pizza.",
                  "You can also press 'w' to pick up one Dead Kid or Pizza and put it in your inventory.",
                  "Line up your front foot with what you want to eat or pick up.",
                  "To access your inventory, press the Left Control key, then '1',",
                  "then the number corresponding to the item you want to use.",
                  "",
                  "HINT: Dead Kids refill your health and decreases your hunger a little bit each.",
                  "      Pizza fills up your hunger meter by a lot.",
                  "      Dead Kids and Powerups (like Pizza) disappear after some time passes,",
                  "      so be sure to pick up the ones you want to keep for later."],
                 
                 [["Linear", [.2, 2, 0, 60], "Kid", "Kills"],
                  ["StatBurst",[0,1], "Pizza", "Kills"]]]
    
INTRO_LEVELS[3] = ["A Stronger Attack", [[5, "KillsByKick"],[5, "KillsByPunch"]], 1000,
                 ["Lets see some variety in your attacks. Kick those little brats by pressing 'd'.",
                  "Goal: Kill 5 Kids with kicks. Kill 5 Kids with punches.",
                  "",
                  "HINT: Kicks are slower than punches but can take out up to 7 kids at a time.",
                  "      They will hit kids along your leg out to and around your foot.",
                  "",
                  "Remember to keep eating."],
                 
                 [["Linear", [.2, 2, 0, 90], "Kid", "Kills"],
                  ["Random", [], "Kid", "Kills"]]]
    
INTRO_LEVELS[4] = ["Heartburn Time!", [[15, "KillsByFlame"]], 1000,
                 ["Bring on the pain, bring on the flame!",
                  "Goal: Take down 15 kids with Flame Attacks.",
                  "",
                  "When you're hunger meter fills to the point where you are full, you start getting",
                  "heartburn. Instead of taking some antacid, why not just press 'a' to burp up some",
                  "flames? The Flame Attack is super powerful, scorching all that stand in its path.",
                  "However, every time you perform this attack, your hunger meter decreases, so be",
                  "carful not to flame too much.",
                  "",
                  "HINT: Heartburn will stay around as long as you keep from being hungry. If you",
                  "      start dropping into the 'Almost Full' range, better pick something up quick.",
                  "      In addition to dead kids and Pizza, you can pick up a bowl of",
                  "      Spicy Indian Food which will give you unlimited Heartburn for a few seconds.",
                  "      If you pick one of these up, blow away, but be careful not to let your hunger",
                  "      meter drop too low.",
                  "",
                  "As for the hunger, just keep eating!"],
                 
                 [["Linear", [.3, 3], "Kid", "KillsByFlame"],
                  ["StatBurst", [0,1], "Indian", "Kills"],
                  ["StatBurst", [10,1],"Pizza", "Kills"],
                  ["StatBurst", [20,1],"Indian", "Kills"]]]

                 
INTRO_LEVELS[5] = ["Exit Exam", [[50, "Kills"]], 1000,
                 ["That's all the attacks you've got. Lets see if you've go the skills to survive.",
                  "Goal: Kill 50 kids total."
                  "",
                  "If you're health is really low, try eating some drugs. They'll give you a small boost right",
                  "away, but then do some damage. After a little bit, they will restore your health to full.",
                  "",
                  "Eat tacos to give yourself gas. You can use gas by pressing 'f'. Try it. Its fun!"
                  "",
                  "HINT: Be careful not to take drugs when your health is very low. They might kill you!",
                  "      Try to eat a few dead kids first to raise your health before."],
                 
                 [["Triangle", [.3, 5, 25], "Kid", "Kills"],
                  ["StatBurst", [0,1], "Drugs", "Kills"],
                  ["Random", [], "Drugs", "KillsByFlame"],
                  ["Random", [], "Indian", "KillsByFlame"],
                  ["StatBurst", [0,5],"Tacos", "Kills"]]]

    ##########################################################
    # BEGINNER                                               #
    ##########################################################
    # The Wave Commeth: Kill 70 kids                         #
    # A New (Fat) Challenge: Kill 36 fat kids                #
    # Bigger & Better: Kill 40 strong kids                   #
    # Speed Racer!: Kill 40 fast kids                        #
    # Melting Pot: Kill 40 basic, 20 fast, 20 strong, 20 fat #
    ##########################################################
    
NUM_BEGINNER_LEVELS = 5

BEGINNER_LEVELS = range(NUM_BEGINNER_LEVELS)

BEGINNER_LEVELS[0] = ["The Wave Commeth", [[70, "Kills"]], 0,
                 ["Now that you have graduated your training it is time to be challeged.",
                  "Prepare yourself for the waves of children about to smash against you.",
                  "",
                  "Goal: Kill 70 Kids."],
                 [["StatBurst", [0, 10], "Kid", "Kills"],
                  ["StatBurst", [7, 10], "Kid", "Kills"],
                  ["StatBurst", [15, 10], "Kid", "Kills"],
                  ["StatBurst", [24, 10], "Kid", "Kills"],
                  ["StatBurst", [34, 10], "Kid", "Kills"],
                  ["StatBurst", [45, 10], "Kid", "Kills"],
                  ["StatBurst", [57, 10], "Kid", "Kills"],
                  ["Linear", [.1, 3, 1, 300], "Kid", "Kills"],
                  ["Random", [], "Drugs", "KillsByPunch"]]]

BEGINNER_LEVELS[1] = ["A New (Fat) Challenge", [[36, "FatKidKills"]], 0,
                 ["Not all kids are created equal. You will now begin to face new kid types.",
                  "",
                  "Goal: Kill 36 Fat Kids.",
                  "",
                  "Watch out for the new enemy type: Fat Kids.",
                  "They're slow, but they've got twice the health of a basic kid and bite a little harder."],
                 [["StatBurst", [7, 12], "FatKid", "Kills"],
                  ["StatBurst", [10, 12], "FatKid", "FatKidKills"],
                  ["StatBurst", [20, 12], "FatKid", "FatKidKills"],
                  ["Linear", [.1, 3, -1, 300, 150], "Kid", "Kills"],
                  ["Random", [], "Pizza", "KillsByPunch"]]]

BEGINNER_LEVELS[2] = ["Bigger & Better", [[40, "StrongKidKills"]], 0,
                 ["Not all kids are created equal. You will now begin to face new kid types.",
                  "",
                  "Goal: Kill 40 Strong Kids.",
                  "",
                  "Watch out for the new enemy type: Strong Kids.",
                  "They're faster, stronger, and harder to kill. Not to mention a whole new BEGINNER."],
                 [["StatBurst", [7, 12], "StrongKid", "Kills"],
                  ["StatBurst", [10, 12], "StrongKid", "StrongKidKills"],
                  ["StatBurst", [20, 20], "StrongKid", "StrongKidKills"],
                  ["Linear", [.1, 3, -1, 300, 150], "Kid", "Kills"],
                  ["Random", [], "Drugs", "Kills"],
                  ["StatBurst", [10, 2], "Tacos", "Kills"]]]

BEGINNER_LEVELS[3] = ["Speed Racer!", [[40, "FastKidKills"]], 0,
                 ["Not all kids are created equal. You will now begin to face new kid types.",
                  "",
                  "Goal: Kill 40 Fast Kids.",
                  "",
                  "Watch out for the new enemy type: Fast Kids.",
                  "These little brats are tough to outrun."],
                 [["StatBurst", [7, 12], "FastKid", "Kills"],
                  ["StatBurst", [10, 12], "FastKid", "FastKidKills"],
                  ["StatBurst", [20, 20], "FastKid", "FastKidKills"],
                  ["Linear", [.1, 3, -1, 300, 150], "Kid", "Kills"],
                  ["StatBurst", [10, 2], "Drugs", "Kills"]]]

BEGINNER_LEVELS[4] = ["Melting Pot", [[40, "BasicKidKills"], [20, "FatKidKills"], [20, "StrongKidKills"], [20, "FastKidKills"]], 0,
                 ["You completed your whirlwind tour of the school yard. Now all your friends want to play.",
                  "",
                  "Goal: Kill 40 Kids, 20 Fat Kids, 20 Strong Kids, and 20 Fast Kids"],
                 [["Linear", [0.05, 3, -1, 400], "Kid", "FastKidKills"],
                  ["Linear", [0.05, 3, -1, 400], "FatKid", "StrongKidKills"],
                  ["Linear", [0.05, 3, -1, 400], "StrongKid", "BasicKidKills"],
                  ["Linear", [0.05, 3, -1, 400], "FastKid", "FatKidKills"],
                  ["Random", [], "Indian", "KillsByPunch"]]]

    #####################################################################################
    # CHALLENGE                                                                         #
    #####################################################################################
    # New Challanges: Eat 10 Fat Kids, Kill 18 Strong Kids By Punch, Kill 40 Basic Kids #
    # The Swarm: Kill 150 Weak Kids                                                     #
    # Survival: Survive 6000 Ticks                                                      #
    # Eating Contest: Eat 400 Kids                                                      #
    # Count Down: Kill 200 Kids                                                         #
    #####################################################################################

NUM_CHALLENGE_LEVELS = 5

CHALLENGE_LEVELS = range(NUM_CHALLENGE_LEVELS)

CHALLENGE_LEVELS[0] = ["New Challenges", [[40, "BasicKidKills"],[18, "StrongKidKillsByPunch"],[10, "FatKidsEaten"]], 1000,
                 ["The challenges you have faced previously were simple in design.",
                 "Now some complexity has been introduced. Will you manage it?",
                 "",
                  "Goal: Try to kill 40 Basic Kids, 18 Strong Kids by punch, and eat 10 Fat Kids."],
                 [["Linear", [.1, 1, -1, 200, 100], "Kid", "BasicKidKills"],
                  ["Linear", [.1, 1, 1.5, 150], "StrongKid", "StrongKidKills"],
                  ["Linear", [.1, -3, -1, 300, 150], "FatKid", "Kills"],
                  ["Random", [0.05], "Tacos", "Kills"]]]
                 
CHALLENGE_LEVELS[1] = ["The Swarm", [[150, "WeakKidKills"]], 1000,
                 ["Some things are worse they they seem.",
                  "Goal: Try to kill 150 Weak Kids."
                  "",
                  "Watch out for the new enemy type: Weak Kids.",
                  "What they lack in ability they make up for in numbers."],
                 [["Linear", [.25, 2, -1, 100, 50], "WeakKid", "Kills"],
                  ["Random", [], "Drugs", "KillsByKick"]]]
                 
CHALLENGE_LEVELS[2] = ["Survival", [[6000, "Time"]], 1000,
                 ["Violence is not always the answer.",
                  "Goal: Survive until the timer runs down."],
                 [["Linear", [0, 2, 0, 100], "WeakKid", "Kills"],
                  ["Linear", [0, 1, 0, 153], "Kid", "Kills"],
                  ["Linear", [0, 2, 0, 403], "StrongKid", "Kills"],
                  ["Linear", [0, 1, 0, 305], "FatKid", "Kills"],
                  ["Linear", [0, 2, 0, 427], "FastKid", "Kills"],
                  ["Linear", [0, 1, 0, 1000], "Pizza", "Time"]]]
                  
CHALLENGE_LEVELS[3] = ["Eating Contest", [[400, "Eaten"]], 1000,
                 ["How full is your belly?",
                  "Goal: Eat 400 kids"],
                 [["Linear", [0.025, 2, 0, 100], "WeakKid", "Eaten"],
                  ["Linear", [0, 1, 0, 160], "Kid", "Eaten"],
                  ["Linear", [0.0125, 1, -1, 500, 100], "StrongKid", "Eaten"],
                  ["Linear", [0.0125, 1, 0, 1000], "Tacos", "Eaten"],
                  ["Linear", [0, 1, 0, 1500], "Drugs", "Eaten"]]]
                  
CHALLENGE_LEVELS[4] = ["Count Down", [[200, "Kills"]], 1000,
                 ["Feeling strong enough to go on?",
                  "Goal: Kill 200 kids",
                  "",
                  "HINT: If you take too long things will become very difficult."],
                 [["Linear", [0.025, 2, 0, 100], "WeakKid", "Eaten"],
                  ["Linear", [0, 1, 0, 160], "Kid", "Eaten"],
                  ["Linear", [0.0125, 1, -1, 500, 100], "StrongKid", "Eaten"],
                  ["StatBurst", [4000, 100], "FastKid", "Time"],
                  ["Linear", [0.0125, -1, 0, 1000], "Indian", "Eaten"],
                  ["Linear", [0, 1, 0, 1500], "Drugs", "Eaten"]]]
                 
    ##########################################################
    # EXPERT                                                 #
    ##########################################################
    # Good Luck!: Kill 1000 kids                             #
    ##########################################################

NUM_EXPERT_LEVELS = 1

EXPERT_LEVELS = range(NUM_EXPERT_LEVELS)

EXPERT_LEVELS[0] = ["Good Luck", [[1000, "Kills"]], 1000,
                 ["Some people like the impossible.",
                  "Goal: Try to kill 1000 Kids."],
                 [["Linear", [.5, 2, -1, 60], "FastKid", "Kills"]]]
    
MISSIONS = {"INTRO": INTRO_LEVELS, "BEGINNER": BEGINNER_LEVELS, "CHALLENGE": CHALLENGE_LEVELS, "EXPERT": EXPERT_LEVELS}
